import * as API from '../axios'

export default {

    //登录
    login: (params) => {
        return API.axiosPostAPI('/manage/login', params)
    },
    //注册
    register: (params) => {
        return API.axiosPostAPI('/manage/login/v2/register', params)
    },
    //退出
    logout: params => {
        return API.axiosDeleteAPI('/manage/login', params)
    },

    //获取验证码
    getCode: params => {
        return API.axiosGetAPI('/manage/login/code', params)
    },

    //校验验证码
    checkoutCode: (phone, msgCode, code, email) => {
        return API.axiosPostAPI(
            `/manage/login/verification-code?phone=${phone}&msgCode=${msgCode}&code=${code}&email=${email}`
        )
    },

    //检查账号是否存在
    checkPhone: params => {
        return API.axiosPostAPI(`/manage/login/check-phone?phone=${params}`)
    },

    //重置密码
    resetPassword: (params) => {
        return API.axiosPutAPI(`/manage/login/reset-password`, params)
    },


    //待办事项
    schedule: params => {
        return API.axiosGetAPI('/manage/home/user-todo', params)
    },
}







